<div class="statsRow">
    <div class="wrapper statsItems">

        <div class="widget" style="width:70%; margin-top:0px; float:left;">
            <div class="title"><img src="/images/icons/dark/stats.png" alt="" class="titleIcon" /><h6>Последние активные кампании</h6></div>
            <table cellpadding="0" cellspacing="0" width="100%" class="sTable">
                <thead>
                    <tr>
                        <td>Название</td>
                        <td>Просмотры</td>
                        <td>Клики</td>
                        <td>Бюджет</td>
                        <td>Расходы</td>
                    </tr>
                </thead>
                <tbody>
                    <?php foreach ($this->allcampaigns as $val) { ?>
                    <tr>
                        <td><a href="#" title="" ><?php echo $val['name']; ?></a></td>
                        <td><?php echo $val['count_view']; ?></td>
                        <td><?php echo $val['count_click']; ?></td>
                        <td><?php echo $val['start_budget'].'$'; ?></td>
                        <td><?php echo $val['costs'].'$'; ?></td>
                    </tr>
                    <?php } ?>                    
                </tbody>
            </table>    
        </div>

        <div class="sItem ordersStats" style="float:right;">
            <h2><a title="" class="value"><?php echo $this->countСampaigns['count_campaigns']; ?><span>Campaigns</span></a></h2>
            <div class="statsDetailed" id="s4">
                <div class="statsContent">
                    <div class="sElements">
                        <div class="sDisplay"><h4><?php echo $this->countActiveCampaigns['count_active']; ?></h4><span>active</span></div>
                        <div class="sDisplay"><h4><?php echo $this->countNotConfirmedCampaigns['count_active']; ?></h4><span>inactive</span></div>
                        <div class="sDisplay"><h4><?php echo $this->countBlockedCampaigns['count_active']; ?></h4><span>blocked</span></div>
                    </div>
                    <span class="line"></span>
                    <div class="statsUpdate">
                        <span>Next update in:</span>
                        <span>1 hr 19 min</span>
                        <div class="contentProgress"><div class="barG tipS" id="bar4" title="89%"></div></div>
                    </div>
                    <div class="statsDropBtn"><a href="#" class="button basic"><img src="/images/icons/dark/stats.png" class="icon" alt="" /><span>View statistics</span></a></div>
                </div>
            </div>
            <span class="changes">
                <span class="negBar" values="5,10,15,20,25,30,35,40,45,50"></span>
                <span class="negative">+0.6%</span>
            </span>
        </div>

        <div class="sItem ordersStats" style="float:right; margin-top:10px;">
            <h2><a title="" class="value">30<span>Advertisements</span></a></h2>
            <div class="statsDetailed" id="s4">
                <div class="statsContent">
                    <div class="sElements">
                        <div class="sDisplay"><h4>20</h4><span>active</span></div>
                        <div class="sDisplay"><h4>5</h4><span>inactive</span></div>
                        <div class="sDisplay"><h4>5</h4><span>blocked</span></div>
                    </div>
                    <span class="line"></span>
                    <div class="statsUpdate">
                        <span>Next update in:</span>
                        <span>1 hr 19 min</span>
                        <div class="contentProgress"><div class="barG tipS" id="bar4" title="89%"></div></div>
                    </div>
                    <div class="statsDropBtn"><a href="#" class="button basic"><img src="/images/icons/dark/stats.png" class="icon" alt="" /><span>View statistics</span></a></div>
                </div>
            </div>
            <span class="changes">
                <span class="negBar" values="5,10,15,20,25,30,35,40,45,50"></span>
                <span class="negative">+0.6%</span>
            </span>
        </div>

        <div class="clear"></div>

    </div>
</div>
<div class="line"></div>

<!-- Main content wrapper -->
<div class="wrapper">
    <table width=100% style="margin-right:auto; margin-left:auto;">
        <tbody>
            <tr style="text-align:left;">
                <td width=30%>
                    <div class="formRow">
                        <label>Показать:</label>
                        <div class="formRight" style="margin-right:30px; width:200px;">
                            <select name="select2" >
                                <option value="opt1">Клики</option>
                                <option value="opt2">Показы</option>
                                <option value="opt3">CTR</option>
                                <option value="opt4">мош. просмотры</option>
                                <option value="opt5">мош. клики</option>
                                <option value="opt6">доход</option>
                            </select>           
                        </div>
                        <div class="clear"></div>						
                    </div>
                </td>
                </td>
                <td>
                    <div class="formRow" style="padding:0;">
                        <label>Starting date:</label>
                        <div class="formRight" style="float:none; margin-right:0; padding-top:5px; margin-left: 80px; width: 180px;">
                            <input type="text" class="datepicker" />
                        </div>
                    </div>
                </td>

                <td>
                    <div class="formRow" style="padding:0;">
                        <label>End date:</label>
                        <div class="formRight" style="float:none; margin-right:0; padding-top:5px; margin-left: 60px; width: 180px;">
                            <input type="text" class="datepicker" />
                        </div>
                    </div>
                </td>
                <td>
                    <a class="button greenB" style="margin: 5px;" title="" href="#"><span>построить график</span></a>
                </td>
            </tr>
        </tbody>
    </table>

    <div class="widget chartWrapper">
        <div class="title"><img src="/images/icons/dark/graph.png" alt="" class="titleIcon" /><h6>Статистика по всем сайтам</h6></div>
        <div class="body"><div class="chart"></div></div>
    </div>
    <a href="#" title="" class="button basic" style="margin: 5px;"><span>сохранить график в файл</span></a>
    <a href="#" title="" class="button basic" style="margin: 5px;"><span>распечатать</span></a>
    <a href="#" title="" class="button basic" style="margin: 5px;"><span>скачать отчет </span></a>
</div>
